package com.nulldev.util.net.packets;

import com.nulldev.util.logging.LoggerFactory;

public abstract class ServerPacket extends NetPacket{

	public ServerPacket(String packetName, String id, String data) {
		super(packetName, id, data, PacketType.SERVER);
	}
	
	public ServerPacket(String packetName, String id) {
		this(packetName, id, "");
	}

	@Override
	public void client(byte[] data, byte[] raw, final NetInfo client) {
		LoggerFactory.getLogger(true, true).error("client() was called in a server packet, check your code.");
		return;
	}

	@Override
	public abstract void server(byte[] data, byte[] raw, final NetInfo connection);

}
